import { fromJS } from 'immutable'
import SearchMethods from '../methods/SearchMethods'

const defaultState = fromJS({
  searchs:[],
  serchStatus:false
})

export default (state = defaultState, action) => {
  try {
    return SearchMethods[action.type](state, action)
  } catch (e) {
    return state
  }
}